/*
 * Licensed to The Apereo Foundation under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 *
 * The Apereo Foundation licenses this file to you under the Educational
 * Community License, Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the License
 * at:
 *
 *   http://opensource.org/licenses/ecl2.txt
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations under
 * the License.
 *
 */


@import "button";
@import "triangle-point";

// Temporary Inline Files

// Font Smoothing
@mixin font-smoothing($value: on) {

    @if $value == on {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    @if $value == off {
        -webkit-font-smoothing: subpixel-antialiased;
        -moz-osx-font-smoothing: auto;
    }
}

// Build icons mixin
@mixin build-icon($top, $left, $image, $width, $height) {
    top: $top;
    left: $left;
    width: $width;
    height: $height;
    @include retina-image("#{$img-path}#{$image}", $width $height);
}


// Mixin for removing the object padding
// Easier to add this than add padding to every element
@mixin negate-padding($col-width) {
    // re-position
    margin-left: -20px;
    margin-bottom: -20px;
    padding-left: 20px;
    width: ($col-width - 2);
}

@mixin accordion-header($height, $expand: false) {
    box-sizing: border-box;
    height: $height;
    line-height: $height;
    @include linear-gradient(top, #fff, #f3f5f6);
    border-bottom: 1px solid $main-border-color;
    @include border-top-radius($main-border-radius);
    margin: 0;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    color: darken(#8c939b, 10%);
    font-weight: 600;
    text-shadow: 0 1px 0 $white;
    font-size: 13px;

    @if $expand == true {
        cursor: pointer;
        @include fa-icon($fa-var-chevron-down, after, inline-block, 10px 0);

        &:hover {
            @include linear-gradient(top, #fff, darken(#f3f5f6, 2%));
        }

        &:active {
            @include linear-gradient(top, darken(#fff, 2%), darken(#f3f5f6, 3%));
        }

        &:after {
            float: right;
        }
    }
}

@mixin btn-dd-content-mixin($width) {

    // Base styles
    position: absolute;
    top: 52px;
    left: -1 * (calc($width / 2) - 20px);
    z-index: $max-z - 9;
    visibility: hidden;
    opacity: 0;
    @include transition(all 200ms);
    background: $white;
    border: $thin-border-stroke $main-border-color;
    border-radius: $main-border-radius;
    width: $width;

    header {
        @include linear-gradient($white, #f7f7f7);
        @include border-top-radius($main-border-radius);
        border-bottom: $thin-border-stroke $main-border-color;
        height: 30px;

        > h4 {
            line-height: 30px;
            padding-left: 10px;
        }
    }

    .footer-btn {
        @include linear-gradient($off-white, #f0f2f5);
        border-top: $thin-border-stroke darken(#f0f2f5, 10%);
        @include border-bottom-radius($main-border-radius);
        display: block;
        line-height: 30px;
        text-align: center;
    }
}
